package org.csu.small.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author SongYaolun
 * @version 1.0
 * @date 2020/6/14 21:38
 */
@Data
@TableName("small_order")
public class Order {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private BigInteger orderNo;
    private Integer userId;
    private Integer shippingId;
    private BigDecimal paymentPrice;
    private Integer paymentType;
    private Integer postage;
    private Integer status;
    private LocalDateTime paymentTime;
    private LocalDateTime sendTime;
    private LocalDateTime endTime;
    private LocalDateTime closeTime;
    @TableField(fill = FieldFill.INSERT )
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private List<OrderItem> orderItems = new ArrayList<OrderItem>();
}
